<?php
header("Access-Control-Allow-Origin:*"); // 制定允许其他域名访问

header('Access-Control-Allow-Methods:POST'); // 响应类型

header('Access-Control-Allow-Headers:x-requested-with, content-type'); // 响应头设置
    include './base.php';
    $id = $_GET["id"];
    $sql = "select * from room inner join roomtype where room.roomType = roomtype.rtId and roomId = $id";
    $res = mysql_query($sql);
    $row = mysql_fetch_assoc($res);
    print_r(json_encode($row));
?>